
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module telemetry.timeline.memory_dump_event</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.timeline.html"><font color="#ffffff">timeline</font></a>.memory_dump_event</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/timeline/memory_dump_event.py">telemetry/timeline/memory_dump_event.py</a></font></td></tr></table>
    <p><tt>#&nbsp;Copyright&nbsp;2015&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
#&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
#&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="posixpath.html">posixpath</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
</td><td width="25%" valign=top><a href="telemetry.timeline.event.html">telemetry.timeline.event</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="telemetry.timeline.memory_dump_event.html#GlobalMemoryDump">GlobalMemoryDump</a>
</font></dt><dt><font face="helvetica, arial"><a href="telemetry.timeline.memory_dump_event.html#MemoryBucket">MemoryBucket</a>
</font></dt><dt><font face="helvetica, arial"><a href="telemetry.timeline.memory_dump_event.html#MmapCategory">MmapCategory</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="telemetry.timeline.event.html#TimelineEvent">telemetry.timeline.event.TimelineEvent</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="telemetry.timeline.memory_dump_event.html#ProcessMemoryDumpEvent">ProcessMemoryDumpEvent</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="GlobalMemoryDump">class <strong>GlobalMemoryDump</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Object&nbsp;to&nbsp;aggregate&nbsp;individual&nbsp;process&nbsp;dumps&nbsp;with&nbsp;the&nbsp;same&nbsp;dump&nbsp;id.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;process_dumps:&nbsp;A&nbsp;sequence&nbsp;of&nbsp;<a href="#ProcessMemoryDumpEvent">ProcessMemoryDumpEvent</a>&nbsp;objects,&nbsp;all&nbsp;sharing<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;same&nbsp;global&nbsp;dump&nbsp;id.<br>
&nbsp;<br>
Attributes:<br>
&nbsp;&nbsp;dump_id:&nbsp;A&nbsp;string&nbsp;identifying&nbsp;this&nbsp;dump.<br>
&nbsp;&nbsp;has_mmaps:&nbsp;True&nbsp;if&nbsp;the&nbsp;memory&nbsp;dump&nbsp;has&nbsp;mmaps&nbsp;information.&nbsp;If&nbsp;False&nbsp;then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetMemoryUsage&nbsp;will&nbsp;report&nbsp;all&nbsp;zeros.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="GlobalMemoryDump-GetMemoryUsage"><strong>GetMemoryUsage</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;aggregated&nbsp;memory&nbsp;usage&nbsp;over&nbsp;all&nbsp;processes&nbsp;in&nbsp;this&nbsp;dump.</tt></dd></dl>

<dl><dt><a name="GlobalMemoryDump-IterProcessMemoryDumps"><strong>IterProcessMemoryDumps</strong></a>(self)</dt></dl>

<dl><dt><a name="GlobalMemoryDump-__init__"><strong>__init__</strong></a>(self, process_dumps)</dt></dl>

<dl><dt><a name="GlobalMemoryDump-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>duration</strong></dt>
</dl>
<dl><dt><strong>end</strong></dt>
</dl>
<dl><dt><strong>start</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="MemoryBucket">class <strong>MemoryBucket</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Simple&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;to&nbsp;hold&nbsp;and&nbsp;aggregate&nbsp;memory&nbsp;values.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="MemoryBucket-AddRegion"><strong>AddRegion</strong></a>(self, byte_stats)</dt></dl>

<dl><dt><a name="MemoryBucket-GetValue"><strong>GetValue</strong></a>(self, name)</dt></dl>

<dl><dt><a name="MemoryBucket-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="MemoryBucket-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="MmapCategory">class <strong>MmapCategory</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="MmapCategory-GetMatchingChild"><strong>GetMatchingChild</strong></a>(self, mapped_file)</dt><dd><tt>Get&nbsp;the&nbsp;first&nbsp;matching&nbsp;sub-category&nbsp;for&nbsp;a&nbsp;given&nbsp;mapped&nbsp;file.<br>
&nbsp;<br>
Returns&nbsp;None&nbsp;if&nbsp;the&nbsp;category&nbsp;has&nbsp;no&nbsp;children,&nbsp;or&nbsp;the&nbsp;DefaultCategory&nbsp;if<br>
it&nbsp;does&nbsp;have&nbsp;children&nbsp;but&nbsp;none&nbsp;of&nbsp;them&nbsp;match.</tt></dd></dl>

<dl><dt><a name="MmapCategory-Match"><strong>Match</strong></a>(self, mapped_file)</dt><dd><tt>Test&nbsp;whether&nbsp;a&nbsp;mapped&nbsp;file&nbsp;matches&nbsp;this&nbsp;category.</tt></dd></dl>

<dl><dt><a name="MmapCategory-__init__"><strong>__init__</strong></a>(self, name, file_pattern, children<font color="#909090">=None</font>)</dt><dd><tt>A&nbsp;(sub)category&nbsp;for&nbsp;classifying&nbsp;memory&nbsp;maps.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;name:&nbsp;A&nbsp;string&nbsp;to&nbsp;identify&nbsp;the&nbsp;category.<br>
&nbsp;&nbsp;file_pattern:&nbsp;A&nbsp;regex&nbsp;pattern,&nbsp;the&nbsp;category&nbsp;will&nbsp;aggregate&nbsp;memory&nbsp;usage<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;all&nbsp;mapped&nbsp;files&nbsp;matching&nbsp;this&nbsp;pattern.<br>
&nbsp;&nbsp;children:&nbsp;A&nbsp;list&nbsp;of&nbsp;<a href="#MmapCategory">MmapCategory</a>&nbsp;objects,&nbsp;used&nbsp;to&nbsp;sub-categorize&nbsp;memory<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;usage.</tt></dd></dl>

<hr>
Class methods defined here:<br>
<dl><dt><a name="MmapCategory-DefaultCategory"><strong>DefaultCategory</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>An&nbsp;implicit&nbsp;'Others'&nbsp;match-all&nbsp;category&nbsp;with&nbsp;no&nbsp;children.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="ProcessMemoryDumpEvent">class <strong>ProcessMemoryDumpEvent</strong></a>(<a href="telemetry.timeline.event.html#TimelineEvent">telemetry.timeline.event.TimelineEvent</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;memory&nbsp;dump&nbsp;event&nbsp;belonging&nbsp;to&nbsp;a&nbsp;single&nbsp;timeline.Process&nbsp;<a href="__builtin__.html#object">object</a>.<br>
&nbsp;<br>
It's&nbsp;a&nbsp;subclass&nbsp;of&nbsp;telemetry's&nbsp;<a href="telemetry.timeline.event.html#TimelineEvent">TimelineEvent</a>&nbsp;so&nbsp;it&nbsp;can&nbsp;be&nbsp;included&nbsp;in<br>
the&nbsp;stream&nbsp;of&nbsp;events&nbsp;contained&nbsp;in&nbsp;timeline.model&nbsp;objects,&nbsp;and&nbsp;have&nbsp;its<br>
timing&nbsp;correlated&nbsp;with&nbsp;that&nbsp;of&nbsp;other&nbsp;events&nbsp;in&nbsp;the&nbsp;model.<br>
&nbsp;<br>
Properties:<br>
&nbsp;&nbsp;dump_id:&nbsp;A&nbsp;string&nbsp;to&nbsp;identify&nbsp;events&nbsp;belonging&nbsp;to&nbsp;the&nbsp;same&nbsp;global&nbsp;dump.<br>
&nbsp;&nbsp;process:&nbsp;The&nbsp;timeline.Process&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;that&nbsp;owns&nbsp;this&nbsp;memory&nbsp;dump&nbsp;event.<br>
&nbsp;&nbsp;has_mmaps:&nbsp;True&nbsp;if&nbsp;the&nbsp;memory&nbsp;dump&nbsp;has&nbsp;mmaps&nbsp;information.&nbsp;If&nbsp;False&nbsp;then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetMemoryUsage&nbsp;will&nbsp;report&nbsp;all&nbsp;zeros.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="telemetry.timeline.memory_dump_event.html#ProcessMemoryDumpEvent">ProcessMemoryDumpEvent</a></dd>
<dd><a href="telemetry.timeline.event.html#TimelineEvent">telemetry.timeline.event.TimelineEvent</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="ProcessMemoryDumpEvent-GetMemoryBucket"><strong>GetMemoryBucket</strong></a>(self, path)</dt><dd><tt>Return&nbsp;the&nbsp;<a href="#MemoryBucket">MemoryBucket</a>&nbsp;associated&nbsp;with&nbsp;a&nbsp;category&nbsp;path.<br>
&nbsp;<br>
An&nbsp;empty&nbsp;bucket&nbsp;will&nbsp;be&nbsp;created&nbsp;if&nbsp;the&nbsp;path&nbsp;does&nbsp;not&nbsp;already&nbsp;exist.<br>
&nbsp;<br>
path:&nbsp;A&nbsp;string&nbsp;with&nbsp;path&nbsp;in&nbsp;the&nbsp;classification&nbsp;tree,&nbsp;e.g.<br>
&nbsp;&nbsp;&nbsp;&nbsp;'/Android/Java&nbsp;runtime/Cache'.&nbsp;Note:&nbsp;no&nbsp;trailing&nbsp;slash,&nbsp;except&nbsp;for<br>
&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;root&nbsp;path&nbsp;'/'.</tt></dd></dl>

<dl><dt><a name="ProcessMemoryDumpEvent-GetMemoryUsage"><strong>GetMemoryUsage</strong></a>(self)</dt><dd><tt>Get&nbsp;a&nbsp;dictionary&nbsp;with&nbsp;the&nbsp;memory&nbsp;usage&nbsp;of&nbsp;this&nbsp;process.</tt></dd></dl>

<dl><dt><a name="ProcessMemoryDumpEvent-GetMemoryValue"><strong>GetMemoryValue</strong></a>(self, category_path, discount_tracing<font color="#909090">=False</font>)</dt><dd><tt>Return&nbsp;a&nbsp;specific&nbsp;value&nbsp;from&nbsp;within&nbsp;a&nbsp;<a href="#MemoryBucket">MemoryBucket</a>.<br>
&nbsp;<br>
category_path:&nbsp;A&nbsp;string&nbsp;composed&nbsp;of&nbsp;a&nbsp;path&nbsp;in&nbsp;the&nbsp;classification&nbsp;tree,<br>
&nbsp;&nbsp;&nbsp;&nbsp;followed&nbsp;by&nbsp;a&nbsp;'.',&nbsp;followed&nbsp;by&nbsp;a&nbsp;specific&nbsp;bucket&nbsp;value,&nbsp;e.g.<br>
&nbsp;&nbsp;&nbsp;&nbsp;'/Android/Java&nbsp;runtime/Cache.private_dirty_resident'.<br>
discount_tracing:&nbsp;A&nbsp;boolean&nbsp;indicating&nbsp;whether&nbsp;the&nbsp;returned&nbsp;value&nbsp;should<br>
&nbsp;&nbsp;&nbsp;&nbsp;be&nbsp;discounted&nbsp;by&nbsp;the&nbsp;resident&nbsp;size&nbsp;of&nbsp;the&nbsp;tracing&nbsp;allocator.</tt></dd></dl>

<dl><dt><a name="ProcessMemoryDumpEvent-__init__"><strong>__init__</strong></a>(self, process, event)</dt></dl>

<dl><dt><a name="ProcessMemoryDumpEvent-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>process_name</strong></dt>
</dl>
<hr>
Data descriptors inherited from <a href="telemetry.timeline.event.html#TimelineEvent">telemetry.timeline.event.TimelineEvent</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>end</strong></dt>
</dl>
<dl><dt><strong>has_thread_timestamps</strong></dt>
</dl>
<dl><dt><strong>thread_end</strong></dt>
<dd><tt>Thread-specific&nbsp;CPU&nbsp;time&nbsp;when&nbsp;this&nbsp;event&nbsp;ended.<br>
&nbsp;<br>
May&nbsp;be&nbsp;None&nbsp;if&nbsp;the&nbsp;trace&nbsp;event&nbsp;didn't&nbsp;have&nbsp;thread&nbsp;time&nbsp;data.</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>BUCKET_ATTRS</strong> = {'private_clean_resident': 'pc', 'private_dirty_resident': 'pd', 'proportional_resident': 'pss', 'shared_clean_resident': 'sc', 'shared_dirty_resident': 'sd', 'swapped': 'sw'}<br>
<strong>MMAPS_METRICS</strong> = {'mmaps_ashmem': ('/Android/Ashmem.proportional_resident', False), 'mmaps_java_heap': ('/Android/Java runtime/Spaces.proportional_resident', False), 'mmaps_native_heap': ('/Native heap.proportional_resident', True), 'mmaps_overall_pss': ('/.proportional_resident', True), 'mmaps_private_dirty': ('/.private_dirty_resident', True)}<br>
<strong>ROOT_CATEGORY</strong> = &lt;telemetry.timeline.memory_dump_event.MmapCategory object&gt;</td></tr></table>
</body></html>